import React, { lazy } from 'react'

import NormalLayout from '@layout/NormalLayout';
import BasicLayout from '@layout/BasicLayout';

import {
    UserOutlined,
    // PieChartOutlined,
} from '@ant-design/icons';

export const store_routes = [
    { path: '/', exact: true, redirect: '/Log' },
    // { path: '*', exact: true, redirect: '/exception' 
    {
        path: '/Kanban',
        name: '看板',
        icon: "UserOutlined",
        component: lazy(() => import('@pages/Kanban')),
    }
]

const getRouter = (routes) => {
    const router = [
        {
            path: '/',
            component: NormalLayout,
            children: [
                {
                    path: '/Log',
                    name: '登陆',
                    icon: <UserOutlined />,
                    component: lazy(() => import('@pages/Log'))
                },
                {
                    path: '/Task',
                    name: 'Task',
                    icon: <UserOutlined />,
                    component: lazy(() => import('@pages/Task'))
                },
                {
                    // name: '异常页',
                    path: '/exception',
                    component: lazy(() => import('@component/NotFount'))
                },
                {
                    path: '/',
                    component: BasicLayout,
                    children: [
                        // ...routes,
                        ...store_routes
                    ]
                },
            ]
        }
    ]
    return router;
}


export default getRouter; 
